﻿using IRepository;
using IServices;
using Model.Models;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Services
{
    /// <summary>
    /// 用户业务层
    /// </summary>
    public class UserServices : BaseServices<User>, IUserServices
    {
        #region 仓储层注入
        /// <summary>
        /// 初期化用户仓储层
        /// </summary>
        IUserRepository _UserRepository;

        /// <summary>
        ///  用户仓储层注入
        /// </summary>
        /// <param name="baseRepository"></param>
        public UserServices(IBaseRepository<User> baseRepository, IUserRepository iUserRepository)
        {
            base.BaseDao = baseRepository;
            _UserRepository = iUserRepository;
        }
        #endregion


        public Task<int> ModifyByKey(User user)
        {
            return _UserRepository.ModifyByKey(user);

        }
    }
}
